/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pkginterface;
import java.net.InetAddress;
import java.util.Objects;

/**
 *
 * @author Carlos Melo
 */
public class Portal {
    private int porta1;
    private int porta2;
    private InetAddress ip;
    private Estado estado;

    public Portal(int porta1, int porta2, InetAddress ip, Estado estado) {
        this.porta1 = porta1;
        this.porta2 = porta2;
        this.ip = ip;
        this.estado = estado;
    }

    public Portal(int porta1, int porta2, InetAddress ip) {
        this.porta1 = porta1;
        this.porta2 = porta2;
        this.ip = ip;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 71 * hash + this.porta1;
        hash = 71 * hash + this.porta2;
        hash = 71 * hash + Objects.hashCode(this.ip);
        hash = 71 * hash + Objects.hashCode(this.estado);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Portal other = (Portal) obj;
        if (this.porta1 != other.porta1) {
            return false;
        }
        if (this.porta2 != other.porta2) {
            return false;
        }
        if (!Objects.equals(this.ip, other.ip)) {
            return false;
        }
        if (!Objects.equals(this.estado, other.estado)) {
            return false;
        }
        return true;
    }
    
    
}
